05. Roslaunch

Roslaunch

The VM has been updated since producing this video. You should expect your build to be error-free. and absent the build errors the speaker addresses in the video.

roslaunch allows you to do the following

  • Launch ROS Master and multiple nodes with one simple command
  • Set default parameters on the parameter server
  • Automatically re-spawn processes that have died

To use roslaunch , you must first make sure that your workspace has been built, and sourced:

$ cd ~/catkin_ws
$ catkin_make

Once the workspace has been built, you can source it’s setup script:

$ source devel/setup.bash

With your workspace sourced you can now launch simple_arm :

$ roslaunch simple_arm robot_spawn.launch

And there you have it! Your very own two-degree-of-freedom arm in simulation!

Hint: To figure out why the arm is just swinging around loosely, check out the log messages in the ROS master console.

Degrees of Freedom

We haven't talked about degrees of freedom (DOF) yet but we'd like to check your intuition. Check the box next to the correct answer describing why the arm in this simulation has 2 DOF:

SOLUTION: The arm has two joints, one that allows the orange base to rotate and the other that allows the gray segment to swing back and forth.